<template>
	<view>
		<view>工单号： **************</view>
		<!-- <view class="adapter"  v-for="(item,index) in workOrder" :key="item.partitemno">
			<text class="adapterText">订单编号:</text><text>{{item.partitemno}}</text><br/>
			<text class="adapterText">物料编号:</text><text>{{item.partitemno}}</text><br/>
			<text class="adapterText">物料说明:</text><text>{{item.partdesc}}</text><br/>
			<text class="adapterText">需要数量:</text><text>{{item.partitemno}}</text><br/>
			<text class="adapterText">已发数量:</text><text>{{item.partitemno}}</text><br/>
			<text class="adapterText">立库库存:</text><text>{{item.swstore}}</text><br/>
			<text class="adapterText">线边仓库存:</text><text>{{item.owstore}}</text><br/>
			<text class="adapterText">成框数:</text><text></text><br/>
			<text class="adapterText">框数:</text><text></text><br/>
			<text class="adapterText">框提交数:</text><text></text><br/>
			<text class="adapterText">数量:</text><input type="number" v-model="item.count" name="countnumber">
		</view> -->
		
		<!-- <workorder-dl :workOrder="workOrder"></workorder-dl> -->
		<workorderdl :workOrder="workOrder"></workorderdl>
		<view>
			<button @click="submit">提交</button>
		</view>
	</view>
</template>

<script>
	import workorderdl from "@/components/workorder-dl/workorder-dl.vue"; 
	export default {
		components: { workorderdl },  
		data() {
			return {
				workOrder: [],
				inputValue:''
			}
		},
		methods: {
			//根据工单查询物料
			async sendPost(data){
				
				const res = await this.$myRequest({
					url: '/makerwit/wms/getWorkOrder',
					data: '{"wono": "W580070"}',
					method: 'POST'
				})
				console.log('=============================',res)
				console.log("----------",res.data.data.workOrderDList)
				this.workOrder=res.data.data.workOrderDList;
				for(var i = 0,l = this.workOrder.length;i<l;i++){
					this.workOrder[i].count = 0;
				}
				
			},
			submit(){
				for(var i = 0,l = this.workOrder.length;i<l;i++){
					console.log(this.workOrder[i].count)
				}
			}
		},
		onLoad() {
			this.sendPost()
		}
	}
</script>

<style>

</style>
